<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/vue-2.4.0.js"></script>
    <script src="./lib/vue-router-3.0.1.js"></script>
</head>
<body>
    <div id="app"></div>

    <script>
        //创建模板对象
        var login={
            template:'<h1>我爱你</h1>',
            data(){},
            methods:{}
        }

        var vm=new Vue({
            el:'#app',
            data:{},
            methods:{},
            render:function(createElements){//createElememts 是一个方法,可以把组件渲染成为一个html
                return createElements(login)//return的结果会吧el的容器替换掉
            }
        });
    </script>
</body>
</html>